home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / messages.doc < prev    next >
Text File  |  1995-03-31  |  10KB  |  161 lines

  1. (Comp.sys.handhelds) 
  2. Item: 3008 by ftg0673 at tamsun.tamu.edu 
  3. ---------- 
  4.   Resp: 1 of 2 by ftg0673 at tamsun.tamu.edu 
  5. Author: [Rick Grevelle] 
  6.   Date: Mon May 06 1991 
  7.  
  8. Several months ago Wickes posted a tongue-in-cheek library to which he later 
  9. referred as the Bart Simpson Library.  Basically it contained every message 
  10. array in the 48 which of course had been altered to provide a completely new 
  11. set of messages intended to amuse.  In his lecture at the Philadelphia area 
  12. user group meeting last year he alluded, as well as illustrated with another 
  13. library, that this customized message capability had been done purposefully 
  14. to allow the use of other languages.  This article describes the information 
  15. necessary to override any or all of the intrinsic message arrays with in the 
  16. 48.  However, for those individuals who remain too intimidated to delve into 
  17. the world of internals, there are still no means provided here by which any 
  18. of the error messages can be interjected with the name of a specific program 
  19. responsible for generating the error. 
  20.  
  21.  
  22. Rick Grevelle 
  23.  
  24.  
  25.                         Customizing Message Arrays 
  26.  
  27. ============================================================================= 
  28.  
  29.  
  30. By default, the 48 contains thirteen libraries.  Here is a summary of these: 
  31.  
  32.                         Relevant Library Addresses 
  33.  
  34. ----------------------------------------------------------------------------- 
  35. Number/Address |  Hash Table |  Message Array |  Link Table |  Config Routine 
  36. ----------------------------------------------------------------------------- 
  37.   #0h/#028E3h  |    none     |    #72000h  *  |    none     |    #0BB40h **   
  38. ----------------------------------------------------------------------------- 
  39.   #1h/#10F14h  |    none     |    #72704h  *  |    none     |    #11086h **   
  40. ----------------------------------------------------------------------------- 
  41.   #2h/#189E8h  |   #7448Ah * |    #72DCFh  *  |   #22651h   |    #18A01h      
  42. ----------------------------------------------------------------------------- 
  43.   #3h/#29DB3h  |    none     |    #72F1Eh  *  |    none     |     none        
  44. ----------------------------------------------------------------------------- 
  45.   #5h/#35504h  |    none     |    #736F9h  *  |    none     |     none        
  46. ----------------------------------------------------------------------------- 
  47.   #6h/#2C086h  |    none     |    #72FE6h  *  |    none     |     none        
  48. ----------------------------------------------------------------------------- 
  49.   #Ah/#32F5Eh  |    none     |    #72281h  *  |    none     |     none        
  50. -----------------------------------------------------------------------------  
  51.   #Bh/#0F05Ch  |    none     |    #726A5h  *  |    none     |     none        
  52. ----------------------------------------------------------------------------- 
  53.   #Ch/#2D340h  |    none     |    #7232Ch  *  |    none     |    #2D359h **    
  54. ----------------------------------------------------------------------------- 
  55.   #Dh/#0CABEh  |    none     |    #7260Ah  *  |    none     |    #0CAD7h **    
  56. ----------------------------------------------------------------------------- 
  57.  #19h/#0BE14h  |    none     |     none       |    none     |     none        
  58. ----------------------------------------------------------------------------- 
  59.  #F0h/#38836h  |    none     |     none       |   #3834Fh   |     none        
  60. ----------------------------------------------------------------------------- 
  61. #700h/#22DE5h  |   #7247Ch * |     none       |   #22E08h   |    #22EA3h **   
  62. ----------------------------------------------------------------------------- 
  63.  
  64.             *  covered ROM address       **  non-auto attaching 
  65.  
  66.  
  67. Only ten of the thirteen libraries contain message arrays, of which there is 
  68. one whose configuration routine is auto attaching.  To override any of these 
  69. message arrays the library to which it belongs must first be attached.  Then 
  70. the replacement message array, which can be stored in either a library as an 
  71. XLIB or a directory as a GLOBAL variable, must be attached via the use of an 
  72. unavailable user language command.  The directory which has been provided at 
  73. end of this article contains all ten of the 48's message arrays, each stored  
  74. in GLOBAL variables corresponding to library's hexadecimal number.  Routines 
  75. used for attaching and detaching these message arrays have been included. 
  76.  
  77. Because most users will not be interested in changing all of the 48's message 
  78. arrays, it won't be necessary for those individuals to store and attach every 
  79. one of these.  It is for this reason I'm providing the following illustration 
  80. which will demonstrate how to attach and override a single message array, and 
  81. then return control to the default.  In order to benefit those whose capacity 
  82. to program the calculator is limited to user language, the information that's 
  83. being presented here is in a format understandable and familiar to all of us. 
  84. Others whose programming skills are already advanced will need only a look at 
  85. the two routines CUSTOM and DEFAULT after reading this material to understand 
  86. their function. 
  87.  
  88. All of the object types not supported by the display routines can be found in 
  89. the message array belonging to library #1.  I've always hated those Externals 
  90. appearing in the display.  Greater than ninety percent of these are merely an 
  91. assortment of the prefixed machine routines of which the SYSTEM RPL is built. 
  92. Perhaps if Hewlett-Packard had foreseen the immense popularity of the 48 they 
  93. would have taken the time to do things a bit differently.  Because it is most 
  94. unlikely any of the objects represented by Externals would be something other 
  95. than prefixed machine code, it might be preferable for the display routine to 
  96. to use Address instead.  So for the example chosen the message array is going 
  97. to be changed such that all Externals will appear as Address. 
  98.  
  99.  
  100.         o  First, it will most always be desirable to start by altering 
  101.            a copy of the default message array.  This will be much less 
  102.            trouble than constructing an array from scratch.  It's not a 
  103.            major task to recall a copy of any of the ten default arrays 
  104.            to the stack, but to alter an array of strings, two routines   
  105.            from the HACKIT library, OUT\->, and \->ARR will be needed. 
  106.  
  107.         o  The message arrays for all of the ROM libraries can be found 
  108.            in the 32K bank of ROM that's normally covered by RAM.  It's 
  109.            for this reason that it is often referred to as covered ROM. 
  110.            Recalling objects from this usually inaccessible bank of ROM 
  111.            requires only two steps, and of course the object's address. 
  112.  
  113.         o  Recall a copy of the message array from a library by placing 
  114.            the location of the message array in level one, #72704h, and 
  115.            executing \<< #05A03h SYSEVAL #0C612h SYSEVAL \>>.  An array 
  116.            of string which is the message array from library #1 will be 
  117.            the result.  Consult the table for the addresses to the rest 
  118.            of the message arrays.                  
  119.  
  120.         o  Use the OUT\-> command in the HACKIT library for decomposing 
  121.            the array into its sixty-two constituent strings.  It is now 
  122.            possible to edit any of the individual strings, then altering 
  123.            or completely replacing the string.  Make sure you've put the 
  124.            string back in its appropriate position on the stack after it 
  125.            has been altered.  Use \->ARR to recompile the message array 
  126.            of strings. 
  127.  
  128.         o  After the array has been altered, store it in a GLOBAL name, 
  129.            and attach the library from which it came, if it hasn't been 
  130.            done previously.  Note only one out of the ten ROM libraries 
  131.            is auto attaching; all others must be attached.  ATTACH will 
  132.            not work for ROM libraries so place the binary number of the 
  133.            library, #1h, in level one, and then execute these SYSEVALs: 
  134.            \<< #05A03h SYSEVAL #07709h SYSEVAL \>>. 
  135.  
  136.         o  Next the array must be identified as the replacement for the 
  137.            default array and attached too.  Again, this will need to be 
  138.            done using SYSEVALs, so once more place the library's binary 
  139.            number in level one, and the GLOBAL in which the replacement 
  140.            message array is stored in level two, and use the following: 
  141.            \<< #05A03h SYSEVAL SWAP RCL #0764Eh SYSEVAL \>> 
  142.  
  143.         o  Nullify the above procedure by detaching the library, and in 
  144.            the case of library #2h, reattach.  To detach put the number  
  145.            of the library being detached in level one and execute this: 
  146.            \<< #05A03h SYSEVAL #076AEh SYSEVAL \>>. 
  147.  
  148.  
  149. The following directory contains all of the 48's default message arrays with 
  150. an exception; the string "External" in library #1h was changed to "Address". 
  151. The affect of this can be viewed by installing the directory, then recalling 
  152. the contents of the CUSTOM variable to the stack, and toggling both commands 
  153. CUSTOM and DEFAULT.  The display auto refreshes after each key press so that 
  154. the unsupported prefixed machine routines will change back and forth between 
  155. External and Address.  Last it should be mentioned that if it's desirable to 
  156. convert the directory into a library, it would be advisable to place all the 
  157. GLOBAL names containing message arrays in a list in $HIDDEN so that they are 
  158. not visible in the library.  GLOBAL names beginning with the letter "A" will 
  159. contain message arrays.  Characters following each dot relate the library's 
  160. hexadecimal number to the message array contain in the variable. 
  161.